Redirect generated XML artifacts to gitignored test output directory#151
Closed
Copilot wants to merge 5 commits into
Closed
Redirect generated XML artifacts to gitignored test output directory#151Copilot wants to merge 5 commits into
Copilot wants to merge 5 commits into
Conversation
Copilot
AI
changed the title
Fix #150: stop writing XML artifacts to repo root
Redirect generated XML artifacts to gitignored test output directory
May 22, 2026
Copilot created this pull request from a session on behalf of
webern
May 22, 2026 10:05
View session
webern
requested changes
May 22, 2026
| @@ -0,0 +1,86 @@ | |||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
Owner
There was a problem hiding this comment.
@copilot You checked-in the file that we are supposed to be ignoring.
| @@ -0,0 +1,86 @@ | |||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
Author
Fixed in |
webern
approved these changes
May 22, 2026
webern
requested changes
May 22, 2026
|
|
||
| return 0; | ||
| } No newline at end of file | ||
| } |
Author
There was a problem hiding this comment.
src/private/mx/examples/Write.cpp already ends with a trailing newline. I verified this locally and re-ran make check; there is no remaining diff to apply for this suggestion.
Author
Done in |
webern
added a commit
that referenced
this pull request
May 22, 2026
Fixes #150. The `mxwrite` example program previously hard-coded its output to `./example.musicxml`, which left an untracked file at the repo root every time examples ran (i.e. for every `make test` / `make test-all` invocation). ## Changes - **`src/private/mx/examples/Write.cpp`** \u2014 `mxwrite` now accepts an optional output path via `argv[1]`, defaulting to `./example.musicxml` so the README's illustrative path still works when a user runs the binary by hand. - **`Makefile`** \u2014 `run_examples` now passes `./data/testOutput/example.musicxml` to `mxwrite` and ensures the directory exists. `data/testOutput/` is already gitignored. - **`data/testOutput/.gitignore`** \u2014 added `*.musicxml` (it only covered `*.xml`, `*.csv`, `*.txt` before). - **`src/private/mxtest/api/DocumentManagerTest.cpp`** and **`src/private/mxtest/api/RoundTrip.h`** \u2014 two other `writeToFile` calls that also dumped XML at the repo root (`sillytest.xml` and `output.xml`) now write into `data/testOutput` via `mxtest::getResourcesDirectoryPath()`. - **`README.md`** \u2014 the example code snippet matches the updated `Write.cpp`. ## Verification Ran locally: - `make fmt` \u2014 clean - `make check` \u2014 `=== check passed ===` - `make test-all` \u2014 `All tests passed (9914 assertions in 2678 test cases)` After the full run, no `example.musicxml`, `example.xml`, `sillytest.xml`, or `output.xml` remain at the repo root. This supersedes #151.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/private/mx/examples/Write.cpp